<template>
  <div class="main" v-color="'bgkImg'">
    <dz-nav :is-back="true" back-url="/">
      <template #center>
        <b v-color class="fontSize14"><qq>ProjectIntroduction</qq></b>
      </template>
    </dz-nav>
    <div class="box-1">
      <div class="box-content">
        <p class="title">{{title}}</p>
        <span v-html="renderedContent"></span>
      </div>

      <div class="bottom">
        <dz-button v-routers="{path:'/'}"><qq>GoBack</qq></dz-button>
      </div>
    </div>
    <dz-safe></dz-safe>
  </div>
</template>

<script>
  import {getSysParm} from "@/api/apiFox";

  export default {
    data(){
      return{
        content:'',
        title:''
      }
    },
    computed: {
      renderedContent() {
        return this.content.replace(/<img(.*?)src="(.*?)"(.*?)>/g, (match, p1, p2, p3) => {
          return `<img${p1}src="${p2}" style="width: 100% !important;border-radius:15px">`;
        });
      }
    },
    methods:{
      getList(){
        let form ={
          language: "ZH_EN",
          officialType: 11
        }
        getSysParm(form).then(res=>{
          this.title = res.title
          console.log(res)
          this.content = res.dzcontent
        }).catch(err=>{})
      }
    },
    mounted() {
      this.getList()
    }
  }
</script>

<style scoped lang="scss">
.main{
  width: 100%;
  min-height: 100vh;
  .box-1{
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
    .title{
      width: 100%;
      font-size: 14px;
      font-weight: 600;
      color: #3F3F3F;
    }
    .box-content{
      border-radius: 10px;
      width: 100%;
      min-height: 100px;
      background: #fff;
      padding: 16px;
      box-sizing: border-box;
      font-size: 12px;
      line-height: 24px;
      color: #666666;
    }
    .bottom{
      width: 100%;
      margin-top: 20px;
    }
  }
}
</style>